<?php

namespace App\Transformers;

use App\Models\Star;
use League\Fractal\TransformerAbstract;

class StarTransformer extends TransformerAbstract
{
    public function transform(Star $star)
    {
        return [
            'id' => $star->id,
            'name' => $star->name,
            'movie_count' => $star->movie_count,
        ];
    }
}